package com.gqz.defect.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


/**
 * @ClassName EnDefectsSheetEntity
 * @Description 消缺工单表
 */


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("T_EN_DEFECTS_SHEET")
public class TEnDefectsSheetEntity implements Serializable {
/**todo todo必须要指定表的主键，指定完成后删除此行todo  */

    /**
     * 主键
     */
    @TableField(value = "ID")
    private String id;

    /**
     * 消缺工单名称
     */
    @TableField(value = "GDMC")
    private String gdmc;

    /**
     * 消缺单位编码
     */
    @TableField(value = "XQDWBM")
    private String xqdwbm;

    /**
     * 消缺单位名称
     */
    @TableField(value = "XQDWMC")
    private String xqdwmc;

    /**
     * 消缺班组编码
     */
    @TableField(value = "XQBZBM")
    private String xqbzbm;

    /**
     * 消缺班组名称
     */
    @TableField(value = "XQBZMC")
    private String xqbzmc;

    /**
     * 计划开始时间
     */
    @TableField(value = "JHKSSJ")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "jhkssj", format = "yyyy-MM-dd HH:mm:ss")
    private Date jhkssj;

    /**
     * 计划结束时间
     */
    @TableField(value = "JHJSSJ")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "jhjssj", format = "yyyy-MM-dd HH:mm:ss")
    private Date jhjssj;

    /**
     * 派单人id
     */
    @TableField(value = "PD_PERSON")
    private String pdPerson;

    /**
     * 派单人名称
     */
    @TableField(value = "PD_PERSON_NAME")
    private String pdPersonName;

    /**
     * 派单人电话
     */
    @TableField(value = "PDR_TEL")
    private String pdrTel;

    /**
     * 派单时间
     */
    @TableField(value = "PDR_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "pdrTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date pdrTime;

    /**
     * 消缺主要内容
     */
    @TableField(value = "XQNR")
    private String xqnr;

    /**
     * 创建人id
     */
    @TableField(value = "CREATE_PERSON")
    private String createPerson;

    /**
     * 创建人名称
     */
    @TableField(value = "CREATE_PERSON_NAME")
    private String createPersonName;

    /**
     * 创建时间
     */
    @TableField(value = "CREATE_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "createTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 工单来源编码 0-平台创建 1-app创建
     */
    @TableField(value = "GD_RESOUS_ID")
    private String gdResousId;

    /**
     * 工单来源名称
     */
    @TableField(value = "GD_RESOUS_NAME")
    private String gdResousName;

    /**
     * 工单状态编码
     */
    @TableField(value = "GDZT")
    private String gdzt;

    /**
     * 工单状态名称
     */
    @TableField(value = "GDZT_MC")
    private String gdztMc;

    /**
     * 接单人id
     */
    @TableField(value = "JD_PERSON")
    private String jdPerson;

    /**
     * 接单人名称
     */
    @TableField(value = "JD_PERSON_NAME")
    private String jdPersonName;

    /**
     * 接单时间
     */
    @TableField(value = "JD_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "jdTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date jdTime;

    /**
     * 接单电话
     */
    @TableField(value = "JD_TEL")
    private String jdTel;

    /**
     * 接单人照片
     */
    @TableField(value = "JD_PHOTO")
    private String jdPhoto;

    /**
     * 消缺结论
     */
    @TableField(value = "XQJL")
    private String xqjl;

    /**
     * 质量评价结论编码
     */
    @TableField(value = "ZLPJJL")
    private String zlpjjl;

    /**
     * 质量评价结论编码
     */
    @TableField(value = "ZLPJJLMC")
    private String zlpjjlmc;

    /**
     * 评价说明
     */
    @TableField(value = "PJSM")
    private String pjsm;

    /**
     * 评价人
     */
    @TableField(value = "PJR_NAME")
    private String pjrName;

    /**
     * 评价时间
     */
    @TableField(value = "PJ_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "pjTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date pjTime;

    /**
     * 所属机房id
     */
    @TableField(value = "SSJF")
    private String ssjf;

    /**
     * 所属机房名称
     */
    @TableField(value = "SSJFMC")
    private String ssjfmc;

    /**
     * 缺陷隐患数量
     */
    @TableField(value = "QXYHSL")
    private String qxyhsl;

    /**
     * 是否删除 0否1是
     */
    @TableField(value = "SFSC")
    private String sfsc;

    /**
     * 到达现场时间
     */
    @TableField(value = "DDXC_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "ddxcTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date ddxcTime;

    /**
     * 完成消缺时间
     */
    @TableField(value = "WCXQ_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "wcxqTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date wcxqTime;

    /**
     * 消缺人员id
     */
    @TableField(value = "XQ_PERSON")
    private String xqPerson;

    /**
     * 消缺人员
     */
    @TableField(value = "XQ_PERSON_NAME")
    private String xqPersonName;

    /**
     * app工单状态(1代办2已办3退单4已办)
     */
    @TableField(value = "APP_GDZT")
    private String appGdzt;

    /**
     * app工单状态名称
     */
    @TableField(value = "APP_GDZT_MC")
    private String appGdztMc;

    /**
     * 接单坐标
     */
    @TableField(value = "JD_ZB")
    private String jdZb;

    /**
     * 消缺认证坐标
     */
    @TableField(value = "XQRZ_ZB")
    private String xqrzZb;

    /**
     * 到达现场坐标
     */
    @TableField(value = "DDXC_ZB")
    private String ddxcZb;

    /**
     * 完成消缺坐标
     */
    @TableField(value = "WCXQ_ZB")
    private String wcxqZb;

    /**
     * 消缺认证图片ids
     */
    @TableField(value = "XQRZ_TP_IDS")
    private String xqrzTpIds;

    /**
     * 到达现场图片ids
     */
    @TableField(value = "DDXC_TP_IDS")
    private String ddxcTpIds;

    /**
     * 消缺认证时间
     */
    @TableField(value = "XQRZ_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "xqrzTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date xqrzTime;

    /**
     * 消缺对象类型(0是机房1是库房)
     */
    @TableField(value = "XQDX_LX")
    private String xqdxLx;

    /**
     * 所属库房id
     */
    @TableField(value = "SSKF")
    private String sskf;

    /**
     * 所属库房名称
     */
    @TableField(value = "SSKFMC")
    private String sskfmc;

    /**
     * 消缺站点  0-能源站机房 1-库房
     */
    @TableField(value = "XQZD_TYPE")
    private String xqzdType;

    /**
     * 消缺站点
     */
    @TableField(value = "XQZD_TYPE_NAME")
    private String xqzdTypeName;

    /**
     * start这个是必须要的动态条件集合start   start
     */
    private static Map<String, SFunction<TEnDefectsSheetEntity, ?>> map;

    static {
        map = new HashMap<>();
        map.put("id", TEnDefectsSheetEntity::getId);
        map.put("gdmc", TEnDefectsSheetEntity::getGdmc);
        map.put("xqdwbm", TEnDefectsSheetEntity::getXqdwbm);
        map.put("xqdwmc", TEnDefectsSheetEntity::getXqdwmc);
        map.put("xqbzbm", TEnDefectsSheetEntity::getXqbzbm);
        map.put("xqbzmc", TEnDefectsSheetEntity::getXqbzmc);
        map.put("jhkssj", TEnDefectsSheetEntity::getJhkssj);
        map.put("jhjssj", TEnDefectsSheetEntity::getJhjssj);
        map.put("pdPerson", TEnDefectsSheetEntity::getPdPerson);
        map.put("pdPersonName", TEnDefectsSheetEntity::getPdPersonName);
        map.put("pdrTel", TEnDefectsSheetEntity::getPdrTel);
        map.put("pdrTime", TEnDefectsSheetEntity::getPdrTime);
        map.put("xqnr", TEnDefectsSheetEntity::getXqnr);
        map.put("createPerson", TEnDefectsSheetEntity::getCreatePerson);
        map.put("createPersonName", TEnDefectsSheetEntity::getCreatePersonName);
        map.put("createTime", TEnDefectsSheetEntity::getCreateTime);
        map.put("gdResousId", TEnDefectsSheetEntity::getGdResousId);
        map.put("gdResousName", TEnDefectsSheetEntity::getGdResousName);
        map.put("gdzt", TEnDefectsSheetEntity::getGdzt);
        map.put("gdztMc", TEnDefectsSheetEntity::getGdztMc);
        map.put("jdPerson", TEnDefectsSheetEntity::getJdPerson);
        map.put("jdPersonName", TEnDefectsSheetEntity::getJdPersonName);
        map.put("jdTime", TEnDefectsSheetEntity::getJdTime);
        map.put("jdTel", TEnDefectsSheetEntity::getJdTel);
        map.put("jdPhoto", TEnDefectsSheetEntity::getJdPhoto);
        map.put("xqjl", TEnDefectsSheetEntity::getXqjl);
        map.put("zlpjjl", TEnDefectsSheetEntity::getZlpjjl);
        map.put("zlpjjlmc", TEnDefectsSheetEntity::getZlpjjlmc);
        map.put("pjsm", TEnDefectsSheetEntity::getPjsm);
        map.put("pjrName", TEnDefectsSheetEntity::getPjrName);
        map.put("pjTime", TEnDefectsSheetEntity::getPjTime);
        map.put("ssjf", TEnDefectsSheetEntity::getSsjf);
        map.put("ssjfmc", TEnDefectsSheetEntity::getSsjfmc);
        map.put("qxyhsl", TEnDefectsSheetEntity::getQxyhsl);
        map.put("sfsc", TEnDefectsSheetEntity::getSfsc);
        map.put("ddxcTime", TEnDefectsSheetEntity::getDdxcTime);
        map.put("wcxqTime", TEnDefectsSheetEntity::getWcxqTime);
        map.put("xqPerson", TEnDefectsSheetEntity::getXqPerson);
        map.put("xqPersonName", TEnDefectsSheetEntity::getXqPersonName);
        map.put("appGdzt", TEnDefectsSheetEntity::getAppGdzt);
        map.put("appGdztMc", TEnDefectsSheetEntity::getAppGdztMc);
        map.put("jdZb", TEnDefectsSheetEntity::getJdZb);
        map.put("xqrzZb", TEnDefectsSheetEntity::getXqrzZb);
        map.put("ddxcZb", TEnDefectsSheetEntity::getDdxcZb);
        map.put("wcxqZb", TEnDefectsSheetEntity::getWcxqZb);
        map.put("xqrzTpIds", TEnDefectsSheetEntity::getXqrzTpIds);
        map.put("ddxcTpIds", TEnDefectsSheetEntity::getDdxcTpIds);
        map.put("xqrzTime", TEnDefectsSheetEntity::getXqrzTime);
        map.put("xqdxLx", TEnDefectsSheetEntity::getXqdxLx);
        map.put("sskf", TEnDefectsSheetEntity::getSskf);
        map.put("sskfmc", TEnDefectsSheetEntity::getSskfmc);
        map.put("xqzdType", TEnDefectsSheetEntity::getXqzdType);
        map.put("xqzdTypeName", TEnDefectsSheetEntity::getXqzdTypeName);

    }

    public static SFunction<TEnDefectsSheetEntity, ?> genColumnSFunction(String column) {
        return map.get(column);
    }
    /** end这个是必须要的动态条件集合end   end */


}
